const koa = require('koa')
const bodyparser = require('koa-bodyparser')
const cors = require('koa-cors')
const app = new koa()
app.use(cors())
const InitManager = require('./core/init')
const catchError  = require('./middlewares/exception')

app.use(bodyparser())
app.use(catchError)
InitManager.initCore(app)

// const {loginValidate} = require('./validater/auth')
// loginValidate().validate({request:{body:{phone:123456}}})

app.listen(3000)